from selenium import webdriver
from selenium.webdriver.common.by import By
import time

d = webdriver.Chrome()
d.get('https://www.baidu.com')
time.sleep(1)

p_ele = d.find_element(By.CSS_SELECTOR, '[class="soutu-btn"]')
p_ele.click()
time.sleep(1)

# 只有上传的按钮是 input 标签才可以
x_ele = d.find_element(By.CSS_SELECTOR, '[class="upload-pic"]')
x_ele.send_keys(R'D:\图片\动漫\图片638499405.jpeg')
time.sleep(5)

d.quit()
